package pkg;
import pkg.ComponentCollection.IGameComponent;

public abstract class GameComponent implements IGameComponent
{
	private ComponentCollection collection;
	
	public GameComponent(){}
	public void initialize(ComponentCollection collection)
	{
		this.collection = collection;
		this.initialize();
	}
	
	protected void initialize() 
	{
		
	}
	
	protected <T> T findComponent(Class<T> componentClass)
	{
		return componentClass.cast(collection.find(componentClass));
	}
}